import api from "../../utils/api_util";
import baseUtil from "../../utils/base_util";

const app = getApp();
Page({
    data: {
        StatusBar: app.globalData.StatusBar,
        CustomBar: app.globalData.CustomBar,
        myMsg:[],
    },
    onShow: function () {
        this.getWXACodeUnlimit();
    },
    getWXACodeUnlimit: function () {
        let that = this;
        api.wxRequest.apiRequest(that, api.urls.msgList, {
            method: 'GET',
            data: {
                v: '1.0.0',
                pageNumber: 1,
                pageSize: 100,
                type:'',
            },
            success: function (res) {

                res.data.rows.forEach(function (item,i) {
                    item.createTime = baseUtil.formatDateTime(item.createTime)
                })
                that.setData({
                    myMsg: res.data.rows.reverse()
                })
            },
        })
    },
})